package cau4;

import java.awt.Container;
import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class CapNhatThuoc extends JFrame{
	public CapNhatThuoc(){
		try {
			setDefaultCloseOperation(EXIT_ON_CLOSE);
			initComponent();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	private void initComponent(){
		Container c = getContentPane();
		this.setTitle("Cap Nhat Thuoc");
		this.setSize(600, 500);
		
		JLabel lbtitle = new JLabel();
		lbtitle.setText("Cap Nhat Thuoc");
		lbtitle.setSize(250, 30);
		lbtitle.setFont(new Font("Arial", Font.BOLD, 25));
		lbtitle.setLocation(200, 70);
		
		JLabel lbtmc = new JLabel();
		lbtmc.setText("Ten:");
		lbtmc.setSize(150, 30);
		lbtmc.setLocation(90, 120);
		
		JComboBox f1 = new JComboBox();
		f1.addItem("Medicine 1");
		f1.addItem("Medicine 2");
		f1.setSize(340, 30);
		f1.setLocation(180, 120);
		
		JLabel lbcsdl = new JLabel();
		lbcsdl.setText("Quoc Gia:");
		lbcsdl.setSize(70, 30);
		lbcsdl.setLocation(90, 160);
		
		JComboBox f2 = new JComboBox();
		f2.addItem("Afghanistan");
		f2.addItem("Viet Nam");
		f2.setSize(340, 30);
		f2.setLocation(180, 160);
		
		JLabel lbdn = new JLabel();
		lbdn.setText("Nha San Xuat:");
		lbdn.setSize(140, 30);
		lbdn.setLocation(90, 200);
		
		JTextField f3 = new JTextField();
		f3.setText("");
		f3.setSize(340, 30);
		f3.setLocation(180, 200);
		
		JLabel lbct = new JLabel();
		lbct.setText("Cong Thuc:");
		lbct.setSize(130, 30);
		lbct.setLocation(90, 240);
		
		JTextField f4 = new JTextField();
		f4.setText("");
		f4.setSize(340, 30);
		f4.setLocation(180, 240);
		
		JLabel lbcd = new JLabel();
		lbcd.setText("Cach Dung:");
		lbcd.setSize(130, 30);
		lbcd.setLocation(90, 280);
		
		JTextField f5 = new JTextField();
		f5.setText("");
		f5.setSize(340, 30);
		f5.setLocation(180, 280);
		
		JLabel lbdv = new JLabel();
		lbdv.setText("Don Vi:");
		lbdv.setSize(130, 30);
		lbdv.setLocation(90, 320);
		
		JComboBox f6 = new JComboBox();
		f6.addItem("Tin");
		f6.setSize(110, 30);
		f6.setLocation(180, 320);
		
		JLabel lbtt = new JLabel();
		lbtt.setText("Trang Thai:");
		lbtt.setSize(130, 30);
		lbtt.setLocation(320, 320);
		
		JComboBox f7 = new JComboBox();
		f7.addItem("Openning");
		f7.setSize(130, 30);
		f7.setLocation(390, 320);
		
		JLabel lbsl = new JLabel();
		lbsl.setText("So Luong:");
		lbsl.setSize(130, 30);
		lbsl.setLocation(90, 360);
		
		JTextField f8 = new JTextField();
		f8.setText("0");
		f8.setSize(110, 30);
		f8.setLocation(180, 360);
		
		JLabel lbgia = new JLabel();
		lbgia.setText("Gia:");
		lbgia.setSize(130, 30);
		lbgia.setLocation(320, 360);	
		
		JTextField f9 = new JTextField();
		f9.setText("150000000");
		f9.setSize(130, 30);
		f9.setLocation(390, 360);
		
		JButton but1 = new JButton();
		but1.setText("Cap Nhat");
		but1.setSize(100, 30);
		but1.setLocation(220, 400);
		
		JButton but2 = new JButton();
		but2.setText("Huy Bo");
		but2.setSize(100, 30);
		but2.setLocation(350, 400);		
		
		c.add(lbtitle);
		c.add(lbtmc);
		c.add(f1);
		c.add(lbcsdl);
		c.add(f2);
		c.add(lbdn);
		c.add(f3);
		c.add(lbct);
		c.add(f4);
		c.add(lbcd);
		c.add(f5);
		c.add(lbtt);
		c.add(lbdv);
		c.add(f6);
		c.add(lbsl);
		c.add(f7);
		c.add(f8);
		c.add(lbgia);
		c.add(f9);
		c.add(but1);
		c.add(but2);		
		
		this.setLayout(null);
		this.setVisible(true);
		
	}
}
